.nav{
    padding: 0em 2em;
    background: #f9f9f9;
    border: 1px solid #f1f1f1;
}
.nav:after{
    content: '.';
    display: block;
    height: 0;
    overflow: hidden;
    clear: both;
}
.nav li{
    float: left;
    list-style: none;
}
.nav li a{
    padding: 1em 1.5em;
    text-decoration: none;
    display: block;
}
.active{
    color: red;
    background: #f0f0f0;
}